package com.liuche.book.auth.constant;

public class RedisKeyConstants {
    /**
     * 验证码 KEY 前缀
     */
    private static final String VERIFICATION_CODE_KEY_PREFIX = "book:verification_code:";

    private static final String RED_BOOK_DEFAULT_ID_KEY_PREFIX = "book:red-book:default-id";

    /**
     * 构建验证码 KEY
     * @param phone
     * @return
     */
    public static String buildVerificationCodeKey(String phone) {
        return VERIFICATION_CODE_KEY_PREFIX + phone;
    }

    /**
     * 得到用户唯一 id key
     * @return
     */
    public static String buildBookDefaultIdKey() {
        return RED_BOOK_DEFAULT_ID_KEY_PREFIX;
    }
}
